package offer;

import java.util.Stack;

class offer09 {

}
class CQueue {
    public   Stack<Integer> first = new Stack<>();
    public Stack<Integer> second = new Stack<>();

    public CQueue() {

    }

    public void appendTail(int value) {
        first.push(value);
        // second.push(first.pop());
    }

    public int deleteHead() {
        if(first.isEmpty())
        {
            return -1;
        }else {
            while (!first.isEmpty()) {
                second.push(first.pop());
            }
            int value = second.pop();
            return value;}
    }
}